Communicating with a device via the TCP message driver uses the TCP/IP protocol and Windows sockets. The integrator end point may be set as a server (listening socket) or a client (connecting socket).
The recognised configuration properties are listed below:
Name | Type | Default Value | Description |
Server | Boolean | N/A | Flag to indicate whether this is a server or client |
IPAddress | IP address/host name | N/A | Server IP address or name. It can also be used for TCP server to specify the local IP address the device will listen to This is the case for PC with multiple network adapter with multiple IP addresses. |
Port | port number | N/A | Indicates the port to listen on, or connect to |
ReconnectTime | Unsigned Integer | 5 | Time between client reconnection attempts (seconds). Valid for client only |
NetworkByteOrder | Boolean | False | Identifies the endian order of the message header numeric values. The device IO contents are treated as single bytes therefore not swapped. |
StripHeader | Boolean | N/A | When messages are sent and received the Sym3 Header is not sent as part of the message on the network. This allows devices that do not use the Sym3 Header to communicate with Sym3 |
Autoconnect | Boolean | True | (optional true if not specified). If false, Sym3 won't connect to this device until an explicit call to ConnectDevice() is made from the script. |
LocalIP | IP Address | 0.0.0.0 | Optional. For TCP client Only. To specify the local IP address the device will connect from. This is the case for PC with multiple network adapter with multiple IP addresses. |
LocalPort | port number | 0 | Optional. For TCP client Only. To specify the local port number the device will connect from. |
ContinuouslySendingOutput | Boolean | False | Optional. Output messages are sent only if an output data has been changed. If you want Sym3 to continuously send messages you can set the flag to 'True'. Warning: this may affect performance significantly. Sym3 does not recommend using this setting. The update rate used will be the UpdateRate set for output data. The only way to change this is to export DeviceIOs to CSV file and change the last column then re-import the CSV file. Default rate is set to 50ms. |
server = true port = 16000
stripheader = true msgid = 100 ipaddress = 192.168.25.56 // IP on which server listen to (Optional for PC with multiple IPs)
server = False ipaddress = 192.168.25.56 port = 16000 localip = 192.168.25.55 // IP on which client will connect from (Optional for PC with multiple IPs) localport = 10000 // Local port from which client will connect (Optional) reconnecttime = 10 NetworkByteOrder = false
NOTE: Configuration data is not case sensitive and white space is ignored.
Example Sym3 project using this driver.
These simple examples include conveyors and PEs to demonstrate the setup and principles of operation.
Sym3-NJ1-TCP.s3i - Example project
PLC-NJ1-TCP.smc2 - Example PLC code